<!--
 * @Author: your name
 * @Date: 2021-10-29 11:12:34
 * @LastEditTime: 2021-11-03 15:45:11
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \vue_test\src\components\Test.vue
-->
<template>
  <div>
    <button @click="isShow = !isShow">显示/隐藏</button>
    <transition-group
      appear
      name="animate__animated animate__bounce"
      enter-active-class="animate__swing"
      leave-active-class="animate__backOutUp"
    >
      <h2 v-show="isShow" key="1">你好啊！</h2>
      <h2 v-show="isShow" key="2">尚硅谷！</h2>
    </transition-group>
  </div>
</template>

<script>
import "animate.css";
export default {
  name: "Test3",
  data() {
    return {
      isShow: true,
    };
  },
};
</script>

<style scoped>
h2 {
  background-color: orange;
}
</style>
